{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.all.js"></script>

<!-- 下载文件 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>

<script type="text/javascript">
    var URL = {
            uploader:'{:url('Upload/file')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
    }
    upload_file('file');
    var ue = UE.getEditor('editor');
</script>
{/block}
{block name="main"}

<div class="page-container">

    <form action="{:url('download/save')}" method="post" class="form form-horizontal"
          id="form">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                标题：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="" datatype="*"
                       name="title">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                文件：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input  class="input-text" readonly="readonly" name="file" id="file_post" value="{$data.file ?? ''}" />
                <input id="file" name="file_upload" type="file" multiple="true">
                <input name="old_file" type="hidden" value="{$data.file ?? ''}">
                <div id="queue"></div><a href="__ROOT__/uploads/file/{$data.file ?? ''}">{$data.file ?'下载': ''}</a>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                大小：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input id="file_size" readonly="readonly" class="input-text" value="{$data.size ?? ''}" placeholder="" datatype="*"
                       name="size">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                发布人员：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input type="text" class="input-text" value="{$data.issue ?? ''}" placeholder="" datatype="*"
                       name="issue">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                简单描述：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <textarea name="miaoshu" cols="" rows="" class="textarea" placeholder="说点什么...最少输入10个字符"
                          datatype="*10-100"
                >{$data.miaoshu ?? ''}</textarea>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                详细说明：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <script id="editor" type="text/plain" name="value" style="width:100%;height:400px;">{$data.value|default=''|html_entity_decode ?? ''}</script>

                </div>
                </div>


                <div class="row cl">
                    <div class="col-9 col-offset-2">
                    <input type="hidden"  value="{$data.id ?? ''}" name="id">

                    <input type="hidden" value="{$data.cid ?? $addcid}" name="cid">

                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>

                </div>
                </div>
                </form>
                </div>
                {/block}
